
<%@page import="pasantias.Dominio.BoardBuilder"%>
<%@page import="org.Java2D.Canvas"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>



<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

<script type="text/javascript">
	function mostrarCampos() {
		prefer=document.forms[0].figuras.value;
		document.getElementById("cuadrado").style.display = "none";
		document.getElementById("punto").style.display = "none";
		document.getElementById("rectangulo").style.display = "none";
		document.getElementById("circulo").style.display = "none";
		
		if(prefer == "Punto"){
			var form = document.getElementById("punto");
			form.style.display = "inline";
			figura = "Punto";
		}
		if(prefer == "Cuadrado"){
			var form = document.getElementById("cuadrado");
			form.style.display = "inline";
			figura = "Cuadrado";
		}
		if(prefer == "Rectangulo"){
			var form = document.getElementById("rectangulo");
			form.style.display = "inline";
			figura = "Rectangulo";
		}
		if(prefer == "Circulo"){
			var form = document.getElementById("circulo");
			form.style.display = "inline";
			figura = "Circulo";
		}
	}
</script>
<head>

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Seleccionar Figura</title>
</head>
<body>
	
	<div>
	<form action="BoardServlet" method="get" >
	<h1>Tablero de Figuras!</h1>
	<p style="text-shadow:red;">Elija la figura que desea insertar en su tablero:
		<select id="figuras" name = "Figura" onclick="mostrarCampos();">
			<option value="none" >------
			</option>
			<option  value="Punto" >Punto
			</option>
			<option  value="Cuadrado">Cuadrado
			</option>
			<option  value="Rectangulo">Rectangulo
			</option>
			<option   value="Circulo" >Circulo
			</option>
			</select>
			<input type="submit" value="Dibujar">
		</p></form>
	</div>
	<div id="formulario"></div>
</body>

<div id="punto" style="display:none;">
	<form action="BoardServlet" method="post" >
		<input type="hidden" name="figura" value="punto">
		<table>
			<tr>
				<td>X:</td>
				<td><input type="text" name="x"></td>
			</tr>
			<tr>
				<td>Y:</td>
				<td><input type="text" name="y"></td>
			</tr>
			<tr>
				<td><input type="submit" value="Seleccionar"></td>
			</tr>
		</table>
	</form>
</div>


<div id="cuadrado" style="display: none;">
	<form action="BoardServlet" method="post">
		<input type="hidden" name="figura" value="cuadrado">
		<table>
			<tr>
				<td>X:</td>
				<td><input type="text" name="x"></td>
			</tr>
			<tr>
				<td>Y:</td>
				<td><input type="text" name="y"></td>
			</tr>
			<tr>
				<td>Lado:</td>
				<td><input type="text" name="lado"></td>
			</tr>
			<tr>
				<td><input type="submit" value="Seleccionar"></td>
			</tr>
		</table>
	</form>
</div>

<div id="rectangulo" style="display: none;">
	<form action="BoardServlet" method="post">
		<input type="hidden" name="figura" value="rectangulo">
		<table>
			<tr>
				<td>X:</td>
				<td><input type="text" name="x"></td>
			</tr>
			<tr>
				<td>Y:</td>
				<td><input type="text" name="y"></td>
			</tr>
			<tr>
				<td>Ancho:</td>
				<td><input type="text" name="width"></td>
			</tr>
			<tr>
				<td>Alto:</td>
				<td><input type="text" name="height"></td>
			</tr>
			<tr>
				<td><input type="submit" value="Seleccionar"></td>
			</tr>
		</table>
	</form>
</div>

<div id="circulo" style="display: none;">
	<form action="BoardServlet" method="post">
		<input type="hidden" name="figura" value="circulo">
		<table>
			<tr>
				<td>X:</td>
				<td><input type="text" name="x"></td>
			</tr>
			<tr>
				<td>Y:</td>
				<td><input type="text" name="y"></td>
			</tr>
			<tr>
				<td>Radio:</td>
				<td><input type="text" name="radius"></td>
			</tr>
			<tr>
				<td><input type="submit" value="Seleccionar"></td>
			</tr>
		</table>
	</form>
</div>
</html>

